package cn.getech.data.development.mapper;

import cn.getech.data.development.entity.*;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

/**
 * <p>
 * 作业流菜单树和任务节点或者工作流的关系表 Mapper 接口
 * </p>
 *
 * @author hujz
 * @since 2020-04-13
 */
@Mapper
public interface WorkMenuJobRelMapper extends BaseMapper<WorkMenuJobRel> {

    void batchInsert(@Param("workMenuJobRels") List<WorkMenuJobRel> workMenuJobRels);

    List<WorkMenuJobRel> selectListJobByRootId(@Param("rootId") Long rootId);

    JobNodeInfo selectJobNodeInfoByMenuIdAndName(@Param("menuId") Integer menuId,@Param("name") String name,@Param("procId") Integer procId);

    List<WorkMenuJobRel> selectByWorkMenuIds(@Param("workMenuIds") Set<Long> workMenuIds);

    List<JobLink> getJobLinks();

    List<JobNodeConf> getJobNodeConfs(@Param("procId")Integer procId,@Param("userId")Long userId);

    List<JobNodeInfo> getJobNodeInfos(@Param("procId")Integer procId,@Param("userId")Long userId);

    List<JobInfo> getJobInfos(@Param("procId")Integer procId,@Param("userId")Long userId);

    List<WorkMenuJobRel> listWFJobs(@Param("menuSet")Set<Long> menuSet);
}
